1. Field of the Invention
This invention relates to semiconductor integrated circuits and, particularly, to a microprocessor or microcontroller I/O control circuit which provides four output states corresponding to the four sets of input conditions established by the two inputs to the circuit.
2. Discussion of the Prior Art
FIG. 1 and its accompanying truth table illustrate a typical prior art "three-state" microprocessor I/O control circuit. I/O control circuits of this type are used to establish a communications interface between the internal processing and memory elements of a computer or control system on the one hand and external peripheral equipment, such as a display or a keyboard, on the other hand.
As shown in FIG. 1, two state devices, illustrated as a configuration latch and a data latch, are utilized to control the flow of information between the system's internal data bus and the "output" node of the I/O control circuit, which is the system's contact point with the external world. When both the configuration latch and the data latch are set to zero, the output node is in the high impedance state. The output is also in the high impedance state when the configuration latch is set to zero and the data latch is set to one. To provide a push-pull output, the configuration latch is set to one and the data latch is used to control the output. That is, when the configuration latch is set to one and the data latch is set to zero, the output node is at zero. Conversely, when the configuration latch is set to one and the data latch is also set to one, then the output node is at one.
The above-described I/O control circuit may, thus, be used both to write either high and low outputs from the processor to the external devices or, alternatively, in the high impedance state, to read in information or instructions from peripheral devices.
Circuits of this type find application in conjunction with memory devices where a number of memories are tied together or share a common I/O port. Three-state devices of this type are useful because they allow the user to program the memory while allowing the flexibility to configure the I/O output.
One problem associated with such three-state devices is that if the I/O port is not driven by the external device, then the state of the I/O port is indeterminate. For example, if the I/O port is used to read a switch or keyboard, then when the switch is open, the I/O port is not driven and its state is indeterminate. The conventional solution requires the user to include an additional pull-up resistor on each switch. This requires the use of more parts and increases cost.
A prior art solution ties the pull-up resistor to the I/O port. However, this prevents the I/O port from going to the true high impedance state.